package com.hnevc.yourhealthmanager.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.lang.Nullable;

import java.util.Date;

@Data
@TableName("diet_record_table")
@ApiModel(value = "DietRecord",description = "饮食记录数据，记录每一次的饮食情况")
public class DietRecord {
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Integer id;
    @ApiModelProperty(value = "食物ID")
    private Integer foodId;
    @ApiModelProperty(value = "用户ID")
    private Integer userId;
    @ApiModelProperty(value = "饮食类别ID，早，中，晚等类别")
    private Integer dietCategoryId;
    @ApiModelProperty(value = "饮食典型图片，可选")
    private String dietImage;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    @ApiModelProperty(value = "饮食时间")
    private Date dietTime;
    @ApiModelProperty(value = "饮食重量")
    private Integer dietWeight;
}
